//
//  YSReadOperation.h
//  YSBookRead
//
//  Created by MOLBASE on 2018/11/7.
//  Copyright © 2018年 YangShen. All rights reserved.
//
//  阅读控制器操作

#import <Foundation/Foundation.h>
#import "YSReadRecordModel.h"
#import "YSBookSummaryModel.h"

@class YSReadBookModel, YSReadPageController;

@interface YSReadOperation : NSObject

/// 阅读的数据模型
@property (nonatomic, strong, readonly) NSMutableArray *chapterContentList;
/// 阅读记录
@property (nonatomic, strong, readonly) YSReadRecordModel *readRecord;
/// 来源
@property (nonatomic, strong, readonly) YSBookSummaryModel *bookSummary;

/// 更新BOOK并进行初始化
- (void)updateReadingBook:(YSReadBookModel *)readBook completion:(void(^)(void))completion failure:(void(^)(NSString *))failure;
/// 更新书籍来源
- (void)updateBookSummary:(YSBookSummaryModel *)summary completion:(void(^)(void))completion failure:(void(^)(NSString *))failure;
/// 刷新某章节内容
- (void)getChapterContentWithChapter:(NSInteger)chapter needPadingContent:(BOOL)needPadingContent completion:(void(^)(void))completion failure:(void(^)(NSString *))failure;
/// 自动进行预加载
- (void)autoLoadNextChapters:(NSInteger)chapter;

/// 获取当前阅读记录的阅读View控制器
- (YSReadPageController *)getCurrentPageViewController;
/// 通过阅读历史记录来哦获取页面控制器
//- (YSReadPageController *)getReadViewControllerWithChapterID:(NSString *)chaperID page:(NSInteger)page;
/// 获取上一页控制器
- (YSReadPageController *)getAbovePageViewController;
/// 获取下一页控制器
- (YSReadPageController *)getBelowPageViewController;
/// 更新阅读记录
- (void)updateReadRecordWithChapter:(NSInteger)chapter page:(NSInteger)page;

/// 获取来源列表
- (void)getBookSummaryList:(void (^)(NSArray *summarys, BOOL isSuccess))success;



#pragma mark - web数据



@end
